import request from '@/utils/request.js'

// 根据行政区级别获取项目聚合列表
export function aggregationList(data) {
  return request({
    url: `supervision/making/aggregationList`,
    method: 'GET',
		params: data
  })
}

// 分页获取项目
export function supervisionList(data) {
  return request({
    url: `supervision/making/supervisionList`,
    method: 'GET',
		params: data
  })
}

// 分页获取维护任务
export function getMaintainList(data) {
  return request({
    url: `supervision/maintainkanban/page`,
    method: 'GET',
		params: data
  })
}

// 分页人员信息查询
export function getPeopleList(data) {
  return request({
    url: `supervision/constructionWorker/constructionWorkerLocation`,
    method: 'GET',
		params: data
  })
}

// 通过人员id查询子项
export function getProjectWithUser(data) {
  return request({
    url: `supervision/constructionWorker/page`,
    method: 'GET',
		params: data
  })
}

// 通过人员id查询打卡记录
export function getClickList(data) {
  return request({
    url: `business/sysClock/page`,
    method: 'GET',
		params: data
  })
}

// 获取已经打卡的日期
export function getMonthClickDays(data) {
  return request({
    url: `business/sysClock/getClocksByMonth`,
    method: 'GET',
		params: data
  })
}


// 获取已经打卡的日期
export function getWorkPlanDetail(data) {
  return request({
    url: `business/zdhjcWork/responsible/list`,
    method: 'GET',
		params: data
  })
}

// 获取已经打卡的日期
export function getPlanStatus(data) {
  return request({
    url: `supervision/constructionWorker/attendanceAndPlanStatistics`,
    method: 'GET',
		params: data
  })
}

// 子项目所属项目包含的子项目状态
export function subProjectStatus(projectId) {
  return request({
    url: `supervision/making/subProjectStatus/${projectId}`,
    method: 'GET',
  })
}

export function findProcess(data) {
  return request({
    url: `business/report/app/findProcess/${data.projectId}/${data.subProjectId}`,
    method: 'GET',
  })
}

//查询具体工序设备
export function equipments(data) {
  return request({
    url: `business/report/app/equipments/${data}`,
    method: 'GET',
  })
}

//提交审批
export function auditSubmit(data) {
	return request({
		url: `business/report/app/auditProcess`,
		method: 'POST',
		params: data
	})
}

//工序进度查询
export function progress(detailedProId) {
  return request({
    url: `business/report/app/progress/${detailedProId}`,
    method: 'GET',
  })
}

//查询具体工序设备详情
export function equipmentDetail(data) {
  return request({
    url: `business/report/app/equipmentDetail/${data.standardProId}/${data.standardId}`,
    method: 'GET',
  })
}

//驳回
export function auditReject(data) {
	return request({
		url: `business/report/app/auditReject`,
		method: 'POST',
		params: data
	})
}

//通过
export function auditPass(data) {
	return request({
		url: `business/report/app/auditPass`,
		method: 'POST',
		params: data
	})
}

// 获取行政区划
export function getDistrict(params) {
  return request({
    url: 'business/district/getByParentCode',
    method: 'get',
    params:params
  });
}

/**
 *
 * @param {String} type
 *  type period 期次
 * type section 标段
 */
export function queryListByFieldType(type) {
  return request({
    method: 'get',
    url: `admin/dict/type/${type}`
  });
}

// 维护详情
export function getDetail(standardProId,subProjectId,maintainTaskId) {
	return request({
		url: `business/zdhjcmaintaintask/gaugingPoint/detail/`+standardProId+'/'+subProjectId+'/'+maintainTaskId,
		method: 'get',
	})
}

// 获取项目基础信息
export function projectInfo(projectId) {
  return request({
    url: `business/project/info/`+projectId,
    method: 'GET',
  })
}

// 获取项目基础信息对应的单位名称
export function entityType() {
  return request({
    url: `admin/dict/type/entity_type`,
    method: 'GET',
  })
}

//查询水印
export function waterManagement(id) {
  return request({
    url: `business/zdhjcWatermarkManagement/get/${id}`,
    method: 'GET',
  })
}

//根据id获取考核模板
export function zdhjcsubassessment(data) {
  return request({
    url: `business/zdhjcassessment/page`,
    method: 'GET',
		params:data
  })
}